package com.test.springboot.springBootUtils.bean;

import java.io.Serializable;
import java.util.Date;

import javax.validation.constraints.AssertTrue;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Digits;
import javax.validation.constraints.Email;
import javax.validation.constraints.Future;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Past;

import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Builder
@Data
@AllArgsConstructor //全部字段构造器
@NoArgsConstructor//无参构造器
public class AbsTask implements Serializable {
	private static final long serialVersionUID = 1L;

	private String absTaskId;

	private String packageNumber;

	private String packageName;
	@NotNull(message = "商品单号不能为空")
	private String poOrdPackageNum;

	private String customerName;
	@NotNull(message = "客户编码不能为空")
	private String customerNumber;
	@NotNull(message = "taskID不能为空")
	private String taskId;
	@Length(message = "必须是3位", max = 3, min = 3)
	private String companyNumber;
	@NotNull(message = "角色不能为空")
	private String taskRole;
	@NotEmpty(message = "节点名称不能为空")
	private String taskName;

	private String actualStatus;

	private String actualStaff;
	@Past(message = "不是过去时间")
	private Date createTime;
	@Future(message = "不是将来时间")
	private Date actualTime;

	private String urlTag;
	@Range(max = 4, min = 1, message = "数据不在 1--4 范围内的")
	private String serviceLevel;

	private Date orderCreateTime;

	@CheckCase(value=CaseMode.UPPER,message="名字需要小写")
	private String sourceName;

	private String orderType;
	@NotNull(message = "操作编码不能为空")
	private String packageOperSubType;

	private String auditStyle;

	private String customerId;

	private String poSpecId;

	private String poOrderId;

	private String offerNum;
	private String location;
	@Email(message = "格式不正确")
	private String email;
	@AssertTrue(message = "元素取值必须是true")
	private boolean flag;
	@Digits(fraction = 3, message = "数字不在指定范围之内", integer = 5)
	private int range;

	@DecimalMin(value = "0.1", message = "单价最低为0.1")
	private double price;

}